package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.LeafSegment;
import com.ruoyi.system.mapper.LeafSegmentMapper;
import com.ruoyi.system.service.LeafSegmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @description: TODO
 * @Author: Zhuzhi
 * @Date: 2020/12/13 下午10:01
 */
@Service
public class LeafSegmentServiceImpl implements LeafSegmentService {

    @Autowired
    LeafSegmentMapper leafSegmentMapper;

    @Override
    public List<LeafSegment> selectLeafSegmentList(String namespace) {
        Map<String, String> paramMap = new HashMap<>();
        paramMap.put("namespace", namespace);
        return leafSegmentMapper.selectLeafSegmentList(paramMap);
    }

    @Override
    public int insertLeafSegment(LeafSegment leafSegment) {

        return leafSegmentMapper.insertLeafSegment(leafSegment);
    }

    @Override
    public LeafSegment selectLeafSegment(String namespace) {
        return leafSegmentMapper.selectLeafSegment(namespace);
    }
}
